#pragma once
#ifndef USERINTERFACE_H
#define USERINTERFACE_H

#include <string>
#include "Executor.h"
#include <vcclr.h>

using namespace std;

class UserInterface
{
private:
        static const string MESSAGE[12];
        static const string MESSAGE_WELCOME;

public:
        static enum MESSAGE_TYPE {
                ADDED, CLEARED, DELETED, DONE, EMPTY_FILE, 
                INVALID_CMD, INVALID_DATE, INVALID_INT, INVALID_TASK, INVALID_TASK_NO, INVALID_TIME, 
                MATCH_UNFOUND
        };

        UserInterface(void);
        virtual ~UserInterface(void);

        bool stringObjToStdConversion(System::String^ source, string& result);

        string generateWelcomeMessage(void);
        string readUserInput(System::String^ input);
        void startingExecutor(void);
        string sendingInputToExecutor(string& input);
        string generateMessage(string msg, string param);
        string generateHelpList(void);

private: MESSAGE_TYPE determineMessageType(string msg);
                 static string trim(const string& s, const string& delimiters = " \f\n\r\t\v" );
};

#endif